<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button onclick="bigger()">变大</button>

  <div contenteditable="true" style="width: 500px; height: 500px; border: 1px solid;" font-size="3">
    <a href="https://www.baidu.com">百度</a>
  </div>

  <script>
    let size = 3
    function bigger() {
      document.execCommand('fontSize', false, size++)
    }
  </script>
</body>
</html>